package com.gome.axwl.aoc.service;

import com.github.pagehelper.PageInfo;
import com.gome.axwl.aoc.entity.driver.DriverIntegrationParamForOcsDto;
import com.gome.axwl.aoc.entity.dto.DriverEvaluationDataFromOrderDto;
import com.gome.axwl.aoc.entity.po.DriverIntegrationParamPo;
import com.gome.axwl.aoc.entity.po.DriverIntegrationPo;
import com.gome.commons.core.ResultData;

import java.util.List;

/**
 * @Description: 司机积分业务service
 * @Auther: yinyuxin@gome.com.cn
 * @Date: 2018/4/28 11:06
 */
public interface DriverIntegrationService {

    /**
     * 按月查询所有司机的积分信息,并根据指定字段排序
     * @param driverIntegrationParamPo
     * @return
     */
    PageInfo<DriverIntegrationPo> queryAllDriverIntegration(DriverIntegrationParamPo driverIntegrationParamPo,Integer pageNum,Integer pageSize);

    /**
     * 查询指定司机的历史积分明细
     * @param carrierNo  服务商编码
     * @param driverCode 司机code
     * @param orderField 排序字段 等级：level 服务总分：integra
     * @param orderSort  排序方式 0：从大到小 1：从小到大
     * @param pageIndex
     * @param pageSize
     * @return
     */
    PageInfo<DriverIntegrationPo> queryDriverIntegrationList(String carrierNo,String driverCode,String orderField,Integer orderSort,Integer pageIndex,Integer pageSize);

    /**
     * 查询指定司机，指定日期的积分记录
     * @param driverCode
     * @param dateString
     * @param providerCode
     * @return
     */
    DriverIntegrationPo queryDriverIntegrationByMonth(String driverCode,String providerCode,String dateString);

    /**
     * 批量新增
     * @param driverIntegrationPos
     */
    void batchInsert(List<DriverIntegrationPo> driverIntegrationPos);


    /**
     * 查询接单天数明细
     * @param driverId
     * @param month
     * @return
     */
    ResultData queryDriverTakingsDetail(Integer driverId, String month);

    /**
     * 查询评价信息
     * @param driverId
     * @param month
     * @return
     */
    ResultData<DriverEvaluationDataFromOrderDto> queryDriverCount(Integer driverId,String month);

    /**
     * 批量查询评价信息
     * @param driverIntegrationParamForOcsDto
     * @return
     */
    ResultData<List<DriverEvaluationDataFromOrderDto>> queryDriverCounts(DriverIntegrationParamForOcsDto driverIntegrationParamForOcsDto);


    /**
     * 批量修改
     * @param driverIntegrationPos
     * @return
     */
    void batchUpdate(List<DriverIntegrationPo> driverIntegrationPos);
}
